<template>
  <div class="q-pa-lg">
    <t-currency
      label="测试标题"
      :showSpinButtons="true"
      step='0.1'
      precision='3'
      min='1'
      max='1000'
      labelPosition="left"
      v-model="value"
      placeholder="提示语1235"
      :showHint="true"
      hintMode="custom"
      hintMsg="自定义文字"
      :localInfoList="localInfoList"
      fixedRule='1'
    />
  </div>
</template>

<script setup>
  import { onMounted, ref, watch } from 'vue';

  const value = ref();

  const localInfoList = ref(null);
  try {
    localInfoList.value = TFF.common.ctx.getLocaleInfo();
  } catch (error) {}

  if (!localInfoList.value) {
    localInfoList.value = [
      {
        ID: 'zh-CN',
        ShortName: '简',
        DisplayName: '中文 (简体)',
        RepositoryCode: 'zh_CN',
        Direction: null,
        IsMain: true,
      },
    ];
  }
  localInfoList.value = localInfoList.value.map(item => {
    return {
      lang: item.ID,
      langSuffix: `_${item.ID.replace('-', '_')}`,
      ...item,
    };
  });
</script>
